package com.toprs.base.result

import com.github.pagehelper.Page

class PageResult<T>(
    var total: Long = 0,
    /**当前页数 */
    var pageNo: Int = 0,
    /**总页数 */
    var pages: Int = 0,

    var list: List<T>? = null

) {

    companion object {
        fun <T> processPage(page: Page<T>): PageResult<T> {
            return PageResult(page.total, page.pageNum, page.pages, page.result)
        }
    }


}